<template>
  <div>
    <div class="bcontent">
      <a href="#" @click="click()"><i class="iconfont icon-icon"></i></a>
    </div>
    <div class="bcontent1">
      <input id="oneinput" type="text" placeholder="158家电商 1176439件单品 海外官网查询">
      <i class="iconfont icon-fangdajing"></i>
    </div>
  </div>
</template>

<script type="text/ecmascript-6">
    export default {
      data:function(){
        return {
          n:0
        }
      },
      mounted:function () {
        var that=this;
          $(".bcontent1").find("i").click(function () {
              console.log(that.n++)
              if( $("#oneinput").val()!=null){
                var num=$("#oneinput").val();
                localStorage.setItem("name"+that.n,num)
            }
          })
       },
      methods:{
        click:function () {
          window.history.back();
        }
      }
    }
</script>

<style scoped lang="scss">
  .bcontent{
    width:100%;
    height:0.7rem;
    border-bottom: 1px solid #ddd;
  }
  .bcontent i{
    font-size: 0.3rem;
    padding-top: 0.2rem;
    padding-left:0.2rem;
    display: block;
    color: #333;
  }
  .bcontent1{
    width:90%;
    height:0.3rem;
    margin:0.3rem auto 0;
    border-bottom: 2px solid #333;
  }
  .bcontent1 input{
    display:block;
    height:0.2rem;
    width:90%;
    border:none;
    float:left;
    outline: none;
    font-size:0.16rem;
    margin-top: 0.06rem;
  }
  ::-webkit-input-placeholder{
    font-size:0.16rem;
    color:#c6c6c6;
    padding-top: 2%;
  }
  .bcontent1 i{
    float:right;
    font-size: 0.28rem;
    text-align: center;
  }
</style>
